var prefix="/sysFile/";
$(function () {
	valid();
});
$.validator.setDefaults({
    submitHandler: function() {
    	update();
    }
});
function update(){
    var config={
			url : prefix+"/update",
			data:getFormJson("signupForm"),
	}
	EasyAjax.post_json(config,function(r){
		layer.msg(r.msg);
		if (r.code == 0){
			parent.reLoad();
			var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
			parent.layer.close(index);
		} 
	});
	
}
function valid(){
    var icon = "<i class='fa fa-times-circle'></i>";
        $("#signupForm").validate({
        rules:{
        	id: {
        		 required: true,
        	},
        	uuid: {
        		 required: true,
        	},
        	fileName: {
        		 required: true,
        	},
        	fileSize: {
        		 required: true,
        	},
        	fileType: {
        		 required: true,
        	},
        	localUrl: {
        		 required: true,
        	},
        	orgName: {
        		 required: true,
        	},
        	createId: {
        		 required: true,
        	},
        	modifiedId: {
        		 required: true,
        	},
        	gmtCreate: {
        		 required: true,
        	},
        	gmtModified: {
        		 required: true,
        	},
        },
        messages: {
        	id: {
        		required:icon + "请输入xxx",
        	},
        	uuid: {
        		required:icon + "请输入xxx",
        	},
        	fileName: {
        		required:icon + "请输入xxx",
        	},
        	fileSize: {
        		required:icon + "请输入xxx",
        	},
        	fileType: {
        		required:icon + "请输入xxx",
        	},
        	localUrl: {
        		required:icon + "请输入xxx",
        	},
        	orgName: {
        		required:icon + "请输入xxx",
        	},
        	createId: {
        		required:icon + "请输入xxx",
        	},
        	modifiedId: {
        		required:icon + "请输入xxx",
        	},
        	gmtCreate: {
        		required:icon + "请输入xxx",
        	},
        	gmtModified: {
        		required:icon + "请输入xxx",
        	},
        }
    });
}

